import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "@/utils/element-ui";
import "@/styles/index.scss";
import TreeTable from "vue-table-with-tree-grid";

Vue.config.productionTip = false;

Vue.component("tree-table", TreeTable);
Vue.filter("dataFormat", function (ProcessingTime) {
  const time = new Date(ProcessingTime);

  const y = time.getFullYear();
  const m = (time.getMonth() + 1 + "").padStart(2, "0");
  const d = (time.getDate() + "").padStart(2, "0");
  const hh = (time.getHours() + "").padStart(2, "0");
  const mm = (time.getMinutes() + "").padStart(2, "0");
  const ss = (time.getSeconds() + "").padStart(2, "0");

  return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
});

new Vue({
  router,
  store,
  render: (h) => h(App), //渲染根组件
}).$mount("#app"); //指定挂载节点
